<template>
  <el-dialog
    :title="title"
    :visible.sync="dialogVisible"
    width="35%"
    append-to-body
  >
    <div>
      <div class="stepsBox" v-for="(item, index) in stepsData" :key="index">
        <div class="stepsLeft">
          <div class="circular"></div>
          <div class="lineBox" v-if="index !== stepsData.length - 1">
            <div class="line"></div>
            <i class="el-icon-bottom bottom"></i>
          </div>
        </div>

        <div class="stepsRight">
          <div v-if="item.company" class="mr-20">{{ item.company }}</div>
          <div v-if="item.name" class="mr-20">{{ item.name }}</div>
          <div v-if="item.operation" class="mr-20">{{ item.operation }}</div>
          <div v-if="item.time">{{ item.time }}</div>
        </div>
      </div>
    </div>
    <span slot="footer" class="dialog-footer">
      <el-button @click="dialogVisible = false">关闭</el-button>
    </span>
  </el-dialog>
</template>

<script>
export default {
  name: "",
  components: {},
  props: {},
  data() {
    return {
      dialogVisible: false,
      title: "",
      stepsData: [{
        company: '信息中心',
        name: '张三',
        operation: '上传料单',
        time: '2022-05-02 10:30'
      }, {
        company: '信息中心',
        name: '张三',
        operation: '上传料单',
        time: '2022-05-02 10:30'
      }, {
        company: '',
        name: '',
        operation: '开始加工',
        time: '2022-05-02 10:30'
      }]
    };
  },
  filters: {},
  computed: {},
  watch: {},
  created() {},
  mounted() {},
  beforeDestroy() {},
  methods: {
    see() {
      this.dialogVisible = true;
      this.title = "料单LD123最新状态查看";
    },
  },
};
</script>

<style scoped lang="scss">
.stepsBox {
  display: flex;
  .mr-20 {
    margin-right: 20px;
  }
  .stepsLeft {
    width: 36px;
    display: flex;
    flex-direction: column;
    .circular {
      border-radius: 50%;
      border: 1px solid #1890ff;
      width: 36px;
      height: 36px;
    }
    .lineBox {
      width: 36px;
      display: flex;
      flex-direction: column;
      align-content: center;
      align-items: center;
      margin: 10px 0;
      .line {
        border-left: 2px solid #1890ff;
        height: 30px;
      }
      .bottom {
        color: #1890ff;
        font-size: 24px;
        margin-top: -4px;
      }
    }
  }
  .stepsRight {
    height: 36px;
    display: flex;
    align-items: center;
    padding-left: 20px;
  }
}
</style>
